﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using RStein.PosterousReader.WP.ViewModels.ViewObjects;
using RStein.PosterousReader.WP.Extensions;

namespace RStein.PosterousReader.WP.ViewModels
{
    public class DummyPostDetailViewModelTest : ViewModelBase
    {
        private string m_postTextHeader;
        private PostVO m_selectedPost;
        private string m_postCommentsHeader;

        public DummyPostDetailViewModelTest()
            : base(GlobalConstants.PAGE_POST_DETAIL_TITLE)
        {
            PostTextHeader = GlobalConstants.PAGE_POST_DETAIL_POST_HEADER;
            PostCommentsHeader = GlobalConstants.PAGE_POST_DETAIL_POST_COMMENTS_HEADER;

            SelectedPost = new PostVO()
                                {
                                    Body = "<p><b>Nějaký text</b> ěěěěěěěěěěěššččščč cararararara</p>",
                                    Title = "První příspěvek"                           
                                    
                                };

            SelectedPost.Comments.AddRange(new [] {
                                                        new CommentVO()
                                                        {
                                                            Author = "Rene Stein",
                                                            Text = "Komentar 1"
                                                        },
                                                    
                                                        new CommentVO()
                                                        {
                                                            Author = "Franta Jarda Retarda",
                                                            Text = "Komentář 2"
                                                        }
                                                    
                                                    
                                                   });
        }
        
        public string PostTextHeader
        {
            get
            {
                return m_postTextHeader;
            }

            set
            {
                m_postTextHeader = value;
                RaisePropertyChangedEvent(() => PostTextHeader);
            }

        }

        public string PostCommentsHeader
        {
            get
            {
                return m_postCommentsHeader;
            }

            set
            {
                m_postCommentsHeader = value;
                RaisePropertyChangedEvent(() => PostCommentsHeader);
            }

        }
        public PostVO SelectedPost
        {
            get
            {
                return m_selectedPost;
            }

            set
            {
                m_selectedPost = value;
                RaisePropertyChangedEvent(() => SelectedPost);
            }
        }
    }
}
